import request from '@/utils/request'

//获取标签选项
export function getTagList() {
  return request({
    url: '/admin/tag/option',
    method: 'get',
  })
}

//获取标签列表（包含文章数量）
export function getTagListWithArticle(queryParams) {
  return request({
    url: '/admin/tag/list',
    method: 'get',
    params: queryParams
  })
}

//删除标签
export function deleteTag(tagidList) {
  return request({
    url: '/admin/tag/delete',
    method: 'delete',
    data:tagidList
  })
}

//添加分类
export function addTag(tag) {
  return request({
    url: '/admin/tag/add',
    method: 'post',
    data:tag
  })
}

//修改分类
export function updateTag(tag) {
  return request({
    url: '/admin/tag/update',
    method: 'put',
    data:tag
  })
}